autod2jsp README

Simple setup instructions:

1) Don't edit the autod2jsp.ini file directly, unless you need to delete a line
	Use the autod2jsp Add/Edit controls to add/edit new d2jsp instances.
2) Unzip the entire autod2jsp.zip file over your d2jsp/ folder, and overwrite everything but your .ini file
3) DO NOT rename autostarter.d2j, or starter.d2j, this is no longer required!
3) You can easily use a single d2jsp folder now, by correctly configuring autod2jsp.exe to start the right script(s)
4) Make sure your pathes and file names are 100% correct, even a single mistake will cause autod2jsp to not work.

5) Enjoy ;)

--njaguar


Versioning information:

MAJOR.MINOR.SUB
eg: version 0.1.2

Sub versions will include bug fixes, and minor feature enhancements
Minor versions will include config file changes and/or major enhancements
Major versions will be final release versions



HOW TO USE LOG LIST WINDOW:
Call this function (or similiar):

function debug_log( string ) {
	var CD_LOG		= 3;
	sendCopyData( "autod2jsp", 0, CD_LOG, string );
}



Todo:
 - If you attempt to start a 2nd d2jsp, check titles to make sure they are unique, if not, error message
 - add "runs to stop", max # of runs and then stop
 - add a "stop at x time" option, to auto stop an instance at a certain time
 - add a "start at x time" option, to auto start an instance at a certain time
 - add automatic update to autod2jsp
 - make delete button work
 - create log line limit global setting (max # of logs)
 - add ability to 'copy' a line from the log buffer into the clipboard
 - add a Start All button
 - add -direct option
 - add -txt option (-direct -txt)
 - add option to optionally minimize to systray (instead of always)
 - add check to make sure the default script exists on Start
 - add ability for scripts to change Freeze Timeout delay
 - add simple script editor into autod2jsp, so you dont have to use an external one



HISTORY:
v0.8.0 -
 - Kill now works for Diablo II 1.11b
 - Killing crashed processes now also works

v0.7.2 -
 - Delete button now works! Don't forget to re-save your settings after you delete.

v0.7.1 -
 - Not setting resolution 640x480 checkbox will pass the -res800 param instead.

v0.7.0 -
 - Added Follow Bot Mode option to GUI and autostarter.d2j
 - Added Follow Leader Name option to GUI and autostarter.d2j
 - Updated default Ping Freeze Timeout to 30 minutes.
 
v0.6.8 -
 - Fixed a bug with sending messages to a non-default autostarter.d2j (pause). (thanks TechnoHunter!)


v0.6.7 -
 - Added a crash skip entry for HighCriteria TotalRecorder (thanks boomer!)


v0.6.6 -
 - Added another skip entry for McLspAsyncWindow, was detecting as error and closing D2 (thanks tomb_slayer!)


v0.6.5 -
 - Fixed a very nasty crash bug in my linked list function - thanks for helping me debug Rayuk!


v0.6.4 -
 - Fixed an Add bug where autostarter field was using starter.d2j instead of autostarter.d2j


v0.6.3 -
 - Fixed bug in starter script field, wasn't updating memory when you changed it via the form, and thus wouldn't save


v0.6.2 -
 - Added Starter script filename selector to the configuration of each script
	This allows you to override the autostarter.d2j as the script ran by autod2jsp.exe


v0.6.1 -
 - Added restart game command to autod2jsp and script (restarts on a math engine error, rather than waiting for a timeout)
 - Added a messagebox for delete, since it's not added yet..


v0.6.0 -
 - added realm select ability to autod2jsp and to autostarter.d2j
 - autostarter now tracks single player game count
 - fixed failed to create detections
 - added new delay options and defaults for when a failed to create game occurs (to prevent realm down)
 - removed ALL dde communication protocol stuff, replaced with WM_COPYDATA (requires latest core)
 - Clear log button now clears list before prompting for OK (saves before clear, of course)
 - Added another window skip entry for japanese machines
 - Fixed some path setting problems with the ini and log files.


v0.5.3 -
 - Added realm select support to autod2jsp + script (default USEAST)
 - Added join shell to controlInfo.d2l
 - Added more debug logging for DDE (debugMode=1)
 - Fixed the "script not in d2jsp directory" bug


v0.5.2 -
 - Fixed the icons for kill and update (they were swapped)
 - Added a skip entry for Callisto (crash detection)
 - Added Save Log button, saves to autod2jsp.log
 - Added tons of new features to autostarter.d2j


v0.5.1 -
 - Added rest of the icons, thanks globex!!


v0.5.0 -
 - Added an Update button that will make autostarter re-read your settings (so you can modify on the fly now!)
 - revamped the command send routines in autostarter.d2j and exe
 - Added a Clear Log button
 - Specifying no password now creates a game without a password
 - window background color now uses windows default
 - added another window title to skip as error window
 - Added preliminary button images (thanks globex!)


v0.4.5 -
 - Fixed some incorrect implementations of the DDE server


v0.4.4 -
 - resize on startup + minimize now resizes to exactly the right 800x600 clientRect size.
 - added a debug feature to display a log entry when a restart is caused by a d2 ping timeout
 - added another window title to skip for crash detection


v0.4.3 -
 - If you use auto minimize, autod2jsp now resizes D2 to 800x600 before minimizing to get around the no resize bug in D2
 - if using d2loader and autod2jsp finds plugin/ folder in d2 dir, it auto adds -noplugin option to starting d2loader


v0.4.2 -
 - Added logging to autostarter.d2j, if a failure occurs, it will output it to the log screen and to a log file
 - redesigned GUI layout and look
 - converted buttons to a toolbar
 - added system config option: toolbarButtonShowMode
   ** 0 = Image Only, 1 = Image + Text, 2 = Text Only
   ** Image: http://www.d2jsp.org/autod2jsp/autod2jsp13a.jpg
   ** Image+Text: http://www.d2jsp.org/autod2jsp/autod2jsp13b.jpg
   ** Text: http://www.d2jsp.org/autod2jsp/autod2jsp13c.jpg


v0.4.1 -
 - Fixed a bug where if the global settings section didnt exist, or the ini file didnt exist, the global defaults would not be set
 - Fixed a bug where the window size was not saved correctly, and thus the next window size would be smaller


v0.4.0 -
 - added autoKillDuplicateD2 flag to global settings (default on)
 - Automatically kills any D2 windows with matching titles to a starting instance
 - you can now resize the main autod2jsp window
 - copy button now works
 - stop should now function correctly
   ** Note: Stop only stops autod2jsp from restarting d2 when you close it. It does NOT stop the script(s) from running!
   Use Pause to pause the scripts running, or kill to kill d2
 - kill now also acts as a stop and stops autod2jsp from recreating additional sessions until you start it again
 - start will now resume a 'stopped' d2. If the d2 is closed, it will reopen the d2, otherwise, it'll just set the current d2 mode to running
   ** Note: If you manually stopped your scripts, you will need to use KILL then START
 - autod2jsp now saves and restores window size and position, if you change the size (does not restore maximized though)


v0.3.2 -
 - Added another window title to skip over during crash detection


v0.3.1 -
 - Fixed bug where it would not read windowMode from the ini


v0.3.0 -
 - Fixed no sound issue
 - Added global settings section to ini config, for autod2jsp settings
 - Added minimizeToTray option for autod2jsp global setting
 - Added debugMode option for autod2jsp global setting (right now, it'll be used to display additional d2 error window titles)
 - added showSaveAlert to global settings
 - added showUpdateAlert to global settings
 - updated autostarter.d2j and lib to catch invalid classic or xpac cdkey errors reported by bnet
 - updated autostarter.d2j and lib to be able to tell the difference between Connecting... and Realm Down on char select screen
 - Added skip to bnet option
 - Added minimize d2 on start option (default to true)
 - You can no longer run more than one copy of autod2jsp at a time.


v0.2.10 -
 - Added another window title to skip over during crash detection


v0.2.9 -
 - Fixed a display bug with the setting name introduced in 0.2.8


v0.2.8 -
 - Fixed a bug some people were experiencing where it would think d2 crashed on startup


v0.2.7 -
 - Fixed a bug where the ? select dialog for D2 exe was not working correctly
 - updated scripts to detect connecting dialog to prevent the sgConnecting error
 - autod2jsp must be in your d2jsp folder, will error on startup if it is not


v0.2.6 -
 - Removed the need for d2jsp path, now uses and assumes/requires autod2jsp is in the same dir as d2jsp.exe/dll
 - Added script select dialog and lookup button


v0.2.5 -
 - Fixed a bug related to some D2Loaders and Diablo II.exe causing the processId to change (should now work)


v0.2.4 -
 - Fixed a bug with pause


v0.2.3 -
 - Fixed a bug with autostart, works correctly now


v0.2.2 -
 - autod2jsp now starts the script autostarter.d2j and stops starter.d2j (if it is running)
 - cdkey checkbox cannot be checked without first selecting d2loader option
 - relabeled the auto start d2jsp checkbox


v0.2.1 -
 - Adding or Editting now prompts you to be sure to save the first time you add or edit
 - Saving now prompts you to let you know you successfully saved
 - Reworked the filename generator for the ini file (reported bugs)


v0.2.0 -
 - fixed a couple bugs
 - now reads from an ini file (to prevent the need to keep dumping the config file for each change)
 - Removed D2App variable, now use the d2path to select the d2 exe file
 - d2jspPath now must include the d2jsp.exe
 - Fixed a bug in the attacher sequence, the -install was out of order


v0.1.5 -
 - fixed old reintroduced bugs in the log list


v0.1.4 -
 - fixed a log dde error where it would truncate the log message if there was a comma in it
 - setting list is now single selection, instead of multiple
 - password field is now a password box (shows ****)
 - freeze threshold is now forced to a number box


v0.1.3 -
 - ping timer starts as soon as it attachs d2jsp to catch frozen d2's on attach


v0.1.2 -
 - fixed a bug where it would try to attach d2jsp more than once to a thread in some conditions


v0.1.1 -
 - fixed a log -> list output bug, date wasnt getting inserted


v0.1.0 -
 - there is now a 1 second delay between when autod2jsp finds the d2 (started) window and when it attaches d2jsp
   this was causing crashes when trying to attach too fast
 - added setting name, and renamed Title columns to show this instead, this is for labeling of d2 settings
 - straightened the settings dialog controls (made it look better)
 - added game type
 - added game name
 - added game pass
 - added random game name
 - added random game pass
 - if you set freeze threshold to 0, it will disable it
 - setting name will now update without requiring a restart
 - Kill button now kills the d2 selected


v0.0.7 -
 - any dde command/request issued from d2jsp will reset the idle counter


v0.0.6 -
 - window title, d2 exe, and cdkey.mpq disable/enable based upon d2loader checkbox state
 - cdkey.mpq is disabled/enabled based upon cdkey.mpq checkbox state (and d2loader)


v0.0.5 -
 - Fixed bug with freeze timeout delay
 (first history docs)


More to come ;)

Please report any bugs/failures

Ideas are welcome, but this is very alpha, so there are tons of things already planned. :)

--njaguar
